var instanceMap = new WeakMap;

export class Container {
    static get(service) {
        var item = instanceMap.get(service);
        if (item && item.instance) {
            return item.instance;
        }
        item = {};
        var ret = item.instance = new service;
        instanceMap.set(service,ret);
        return ret;
    }
}